package com.ie.controller.admin;

import com.ie.common.http.ResponseResult;
import com.ie.common.sercurity.anno.AuthIgrone;
import com.ie.entity.AUserEntity;
import com.ie.entity.GoodsTypeEntity;
import com.ie.service.admin.AUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @classname: AUserController
 * @Author: xujia
 * @Description: 管理员控制器
 * @Date: 2024/9/5  22:21
 * @Param:
 * @version: 1.0
 **/
@RestController
@RequestMapping("/api/admin")
@SuppressWarnings("all")
public class AUserController {
    @Autowired
    private AUserService aUserService;

    /**
     * @Description: 管理员登录
     * @Author: xujia
     * @Date: 2024/9/5  22:07
     * @Param: [aUserEntity]
     * @version: 1.0
     * @Return: com.ie.common.http.ResponseResult<java.util.Map < java.lang.String, java.lang.String>>
     **/
    @AuthIgrone
    @PostMapping("/login")
    public ResponseResult<Map<String, String>> login(@RequestBody AUserEntity aUserEntity) {
        return aUserService.login(aUserEntity);
    }


}
